home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar Extras 3
/
Ex3side3.d64
/
mover source
< prev
next >
Wrap
Text File
|
2022-08-28
|
2KB
|
181 lines
open =$ffc0
readst =$ffb7
setlfs =$ffba
setnam =$ffbd
load =$ffd5
getin =$ffe4
clrchn =$ffcc
close =$ffc3 ;a
chrin =$ffcf
chkout =$ffc9 ;x
chkin =$ffc6 ;x
plot =$fff0
chrout =$ffd2
color'pointer =243
screen'line'pointer =209
print'number =$bdcd ;x,a
clear'line =59903
background =53281
border =53280
unlisten =$ffae
clall =$ffe7
.org $c000
.mem
.obj "@0:diff c000"
jsr get'string
jsr setnam
jsr get'number
sty device
tya
tax
lda #1
ldy #0
jsr setlfs
ldx <$a000
ldy >$a000
lda #0
jsr load
stx end'first
sty end'first+1
jsr get'number
sty first
sta first+1
jsr get'string
jsr setnam
jsr get'number
sty device
tya
tax
lda #1
ldy #0
jsr setlfs
ldx <$e000
ldy >$e000
lda #0
jsr load
stx end'second
sty end'second+1
jsr get'number
sty second
sta second+1
differentiate jsr get'string
jsr setnam
jsr get'number
ldx $14
lda #1
ldy #1
jsr setlfs
jsr open
jsr get'number
sty desired
sta desired+1
jsr clrchn
ldx #1
jsr chkout
lda desired
jsr chrout
lda desired+1
jsr chrout
lda <$a000
sta 251
lda >$a000
sta 252
lda <$e000
sta 253
lda >$e000
sta 254
lda <$7000
sta $22
lda >$7000
sta $23
jsr rom'out
loop ldy #0
lda (251),y
cmp (253),y
beq +
sec
sbc first+1
clc ; I know it isn't necessary. sue me for the missing 2 millionths of a second
adc desired+1
+ jsr rom'in
jsr chrout
sta ($22),y
jsr rom'out
inc 251
inc 253
inc $22
bne +
inc 252
inc 254
inc $23
+ lda 252
cmp end'first+1
bcc loop
lda 251
cmp end'first
bcc loop
jsr rom'in
jsr clrchn
lda #1
jmp close
get'number jsr $aefd
jsr $ad8a
jmp $b7f7
;***** get string from BASIC ****
get'string jsr $aefd
jsr $ad9e
jsr $b6a3
ldx $22
ldy $23
rts
rom'out pha
sei
lda #$74
sta 1
pla
rts
rom'in pha
lda #$77
sta 1
cli
pla
rts
first .word 0
second .word 0
difference .word 0
desired .word 0
end'first .word 0
end'second .word 0
device .byt 0